﻿package{	import flash.display.Sprite;	import flash.events.Event;		public class MouseFollower extends Sprite	{		//VARIABLES INTERNAS SETEABLES OBLIGATORIAS.					public var followClip:Sprite;				//VARIABLES INTERNAS SETEABLES OPCIONALES.					public var motionFactor:Number = 0.5;				//CONSTRUCTOR.		public function MouseFollower()		{					}				//INIT.		public function init():void		{			//INICIA EL ENTERFRAME.			addEventListener(Event.ENTER_FRAME, enterFrameHandler);		}				//ENTERFRAMEHANDLER.		private function enterFrameHandler(evt:Event):void		{			var dX:Number = followClip.x - mouseX;			var dY:Number = followClip.y - mouseY;			followClip.x -= dX*motionFactor;			followClip.y -= dY*motionFactor;		}	}}